;(function($,_,undefined){"use strict";ips.controller.mixin('builder.area','core.front.widgets.area',true,function(){_pageID:null;this.after('setup',function(){if(!$('.cWidgetContainer').length){$('[data-action="openSidebar"]').hide();}});this.updateOrdering=function(without){var body=$('body');var order=this.scope.find('> ul').sortable('toArray',{attribute:'data-blockID'});order=(without)?_.without(_.uniq(order),without):_.uniq(order);var self=this;_.each(order,function(value,key){if(self.scope.find('li[data-blockID='+value+']').attr('data-hidden')=='true'){order=_.without(order,value);}});ips.getAjax()(ips.getSetting('baseURL')+'index.php?app=cms&module=pages&controller=builder&do=saveOrder&orientation='+this._orientation,{method:'POST',data:{order:order,pageID:$('#elCmsPageWrap').attr('data-pageid'),area:this._areaID,exclude:_.isString(without)?without:''}}).fail(function(){ips.ui.alert.show({type:'alert',icon:'warn',message:ips.getString('sidebarError'),callbacks:{}});});};});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.mixin('builder.block','core.front.widgets.block',true,function(){this.menuOpened=function(e,data){if(!this.scope.closest('[data-widgetArea]').hasClass('cWidgetContainer_managing')){return;}
var body=$('body');var area=this.scope.closest('[data-widgetArea]').attr('data-widgetArea');var block=this._blockID;var self=this;var managerBlock=$('[data-role="availableBlocks"] [data-blockID="'+this._getBlockIDWithoutUniqueKey(this._blockID)+'"]');var menuStyle=managerBlock.attr('data-menuStyle');if(menuStyle=='modal'){var dialogRef=ips.ui.dialog.create({title:managerBlock.find('h4').html(),url:ips.getSetting('baseURL')+'index.php?app=cms&module=pages&controller=builder&do=getConfiguration&block='+block+'&pageID='+$('#elCmsPageWrap').attr('data-pageid')+'&pageArea='+area,forceReload:true,remoteSubmit:true});dialogRef.show();Debug.log(dialogRef);$('#'+dialogRef.dialogID).css("height","1000px");this._modalOpen=block;}
else
{data.menu.html($('<div/>').addClass('ipsLoading').css({height:'100px'}));setTimeout(function(){ips.getAjax()(ips.getSetting('baseURL')+'index.php?app=cms&module=pages&controller=builder&do=getConfiguration',{data:{block:block,pageID:$('#elCmsPageWrap').attr('data-pageid'),pageArea:area}}).done(function(response){data.menu.html(response).find('form').on('submit',_.bind(self._configurationForm,self,data.menu));$(document).trigger('contentChange',[data.menu]);});},1000);}};this.reloadContent=function(){var self=this;this._setLoading(true);if(this._ajaxObj&&this._ajaxObj.abort){this._ajaxObj.abort();}
var body=$('body');var url=ips.getSetting('baseURL')+'index.php?app=cms&module=pages&controller=builder&do=getBlock&blockID='+this._blockID+'&pageID='+$('#elCmsPageWrap').attr('data-pageid')+'&orientation='+this._orientation;this._ajaxObj=ips.getAjax()(url).done(function(response){self.scope.hide().html(response);ips.utils.anim.go('fadeIn',self.scope);self.trigger('loadedWidget.widgets',{blockID:self._blockID});}).fail(function(){self.scope.html('Error');}).always(function(){self._setLoading(false);});};});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.mixin('comment','core.front.core.comment',true,function(){this.after('saveEditCommentDone',function(){this.scope.find('[data-role="commentContent"]').addClass('sm:ipsPadding_vertical:half').addClass('ipsPadding_vertical').addClass('ipsPadding_horizontal').removeClass('ipsPadding_bottom')});});}(jQuery,_));;